package cn.machen.www.fashion.controller;

import cn.machen.www.fashion.pojo.Category;
import cn.machen.www.fashion.services.CategoryService;
import cn.machen.www.fashion.services.ProductService;
import cn.machen.www.fashion.utils.BaseServlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class CategoryServlet extends BaseServlet {
    private CategoryService categoryService = new CategoryService();

    /*查询所有目录*/
    public String findAll(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        System.out.println("cate");
        System.out.println(request.getParameter("pid"));
        List<Category> all = categoryService.findAll();
        request.setAttribute("category",all);
        return "f:/left.jsp";
    }

}
